﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jarvis.Sensors
{
    /* public class SecondSensor : Sensor
    {
        public SecondSensor()
            : base(60000)
        {
            this.name = "Second";
        }

        public SecondSensor(UInt32 updateInterval)
            : base(updateInterval)
        {
            this.name = "Second";
        }

        public override void Sense(Object stateInfo)
        {
            this.log(DateTime.Now.Second);
        }
    } */

    class MinuteSensor : Sensor
    {
        public MinuteSensor()
            : base(1000)
        {
            this.name = "Minute";
        }

        public MinuteSensor(UInt32 updateInterval)
            : base(updateInterval)
        {
            this.name = "Minute";
        }

        public override void Sense(Object stateInfo)
        {
            this.log((Double) DateTime.Now.Minute);
        }
    }

    class HourSensor : Sensor
    {
        public HourSensor()
            : base(1000)
        {
            this.name = "Hour";
        }

        public HourSensor(UInt32 updateInterval)
            : base(updateInterval)
        {
            this.name = "Hour";
        }

        public override void Sense(Object stateInfo)
        {
            this.log(((Double) DateTime.Now.Hour));
        }
    }

    class DayOfWeekSensor : Sensor
    {
        public DayOfWeekSensor()
            : base(1000)
        {
            this.name = "Day of Week";
        }

        public DayOfWeekSensor(UInt32 updateInterval)
            : base(updateInterval)
        {
            this.name = "Day of Week";
        }

        public override void Sense(Object stateInfo)
        {
            this.log(DateTime.Now.DayOfWeek);
        }
    }
}
